// https://www.cnblogs.com/cyfhykx/p/9121176.html
const xlsx = require('node-xlsx');
const xlsxfile = "C:/Users/asus/Desktop/test.xlsx"
function analysisdata() {
    //解析xlsx
    let obj = xlsx.parse(xlsxfile);
    console.log(obj[0].data)
    const arr = obj[0].data;
    let result = [];
    arr.map((item, index) => {
        if(index > 0) {
            var obj = {
                username: item[0],
                age: item[1],
                sex: item[2]
            }
            result.push(obj)
        }
        
    })
    console.log(result)
}
analysisdata()